package com.ruoyi.system.domain.dto;

/**
 * @author QiuYuchun
 * Date: 2023/12/19
 * Time: 11:17
 */
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import java.util.List;

@Data
public class ToolJsonDto {

    @JSONField(name = "tool_name")
    private String toolName;

    @JSONField(name = "description")
    private String description;

    @JSONField(name = "request_type")
    private String requestType;

    @JSONField(name = "prompt")
    private String prompt;

    @JSONField(name = "base_url")
    private String baseUrl;

    @JSONField(name = "path")
    private String path;

    @JSONField(name = "headers")
    private Headers headers;

    @JSONField(name = "params")
    private Params params;

    @JSONField(name = "body")
    private Body body;

    @JSONField(name = "response_content")
    private String responseContent;

    @JSONField(name = "tool_role")
    private String toolSetRole;

    @Data
    public static class Headers {
        @JSONField(name = "Content-Type")
        private String contentType;

        @JSONField(name = "token")
        private String token;
    }

    @Data
    public static class Body {
        @JSONField(name = "type")
        private String type;

        @JSONField(name = "properties")
        private List<Properties> properties;

        @JSONField(name = "properties_json")
        private String propertiesJson;

        @JSONField(name = "required")
        private List<Required> required;

        @Data
        public static class Properties {
            @JSONField(name = "name")
            private String name;

            @JSONField(name = "type")
            private String type;

            @JSONField(name = "description")
            private String description;
        }


    }

    @Data
    public static class Params {
        @JSONField(name = "type")
        private String type;

        @JSONField(name = "properties")
        private List<Properties> properties;

        @JSONField(name = "properties_url")
        private String propertiesUrl;

        @JSONField(name = "required")
        private List<Required> required;

        @Data
        public static class Properties {
            @JSONField(name = "name")
            private String name;

            @JSONField(name = "type")
            private String type;

            @JSONField(name = "description")
            private String description;
        }

    }

    @Data
    public static class Required {
        @JSONField(name = "paramName")
        private String paramName;

        @JSONField(name = "paramPath")
        private String paramPath;

        @JSONField(name = "description")
        private String description;
    }
}
